package com.ruoyi.comment.service.impl;

import java.util.List;

import com.ruoyi.comment.domain.SysUserComment;
import com.ruoyi.comment.mapper.SysUserCommentMapper;
import com.ruoyi.comment.service.ISysUserCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户和评论关联Service业务层处理
 * 
 * @author zhezhi
 * @date 2022-10-06
 */
@Service
public class SysUserCommentServiceImpl implements ISysUserCommentService
{
    @Autowired
    private SysUserCommentMapper sysUserCommentMapper;

    /**
     * 查询用户和评论关联
     * 
     * @param userId 用户和评论关联主键
     * @return 用户和评论关联
     */
    @Override
    public SysUserComment selectSysUserCommentByUserId(Long userId)
    {
        return sysUserCommentMapper.selectSysUserCommentByUserId(userId);
    }

    /**
     * 查询用户和评论关联列表
     * 
     * @param sysUserComment 用户和评论关联
     * @return 用户和评论关联
     */
    @Override
    public List<SysUserComment> selectSysUserCommentList(SysUserComment sysUserComment)
    {
        return sysUserCommentMapper.selectSysUserCommentList(sysUserComment);
    }

    /**
     * 新增用户和评论关联
     * 
     * @param sysUserComment 用户和评论关联
     * @return 结果
     */
    @Override
    public int insertSysUserComment(SysUserComment sysUserComment)
    {
        return sysUserCommentMapper.insertSysUserComment(sysUserComment);
    }

    /**
     * 修改用户和评论关联
     * 
     * @param sysUserComment 用户和评论关联
     * @return 结果
     */
    @Override
    public int updateSysUserComment(SysUserComment sysUserComment)
    {
        return sysUserCommentMapper.updateSysUserComment(sysUserComment);
    }

    /**
     * 批量删除用户和评论关联
     * 
     * @param userIds 需要删除的用户和评论关联主键
     * @return 结果
     */
    @Override
    public int deleteSysUserCommentByUserIds(Long[] userIds)
    {
        return sysUserCommentMapper.deleteSysUserCommentByUserIds(userIds);
    }

    /**
     * 删除用户和评论关联信息
     * 
     * @param userId 用户和评论关联主键
     * @return 结果
     */
    @Override
    public int deleteSysUserCommentByUserId(Long userId)
    {
        return sysUserCommentMapper.deleteSysUserCommentByUserId(userId);
    }
}
